home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / cdecl-2.000 / cdecl-2 / cdecl-2.5 / Makefile < prev    next >
Encoding:
Makefile  |  1996-01-16  |  1.7 KB  |  64 lines

  1. # @(#)makefile    2.3 1/16/96
  2. # the following can be added to CFLAGS for various things
  3. #
  4. # add -DNOVOID        If your compiler can not handle the void keyword.
  5. # add -DBSD        For BSD4.[23] UNIX Systems.
  6. # add -DDOS        For MS-DOS/PC-DOS Systems, Micro-Soft C 4.0, Turbo C
  7. #                Use the ANSI option.
  8. # add -DNOGETOPT    If your library doesn't have getopt().
  9. #                Another routine will be used in its place.
  10. # add -DNOVARARGS    If you have neither <stdarg.h> (ANSI C) or
  11. #                <varargs.h> (pre-ANSI C).
  12. #                Another method will be compiled instead.
  13. # add -Ddodebug        To compile in debugging trace statements.
  14. # add -Ddoyydebug    To compile in yacc trace statements.
  15. #
  16. # add -DUSE_READLINE    To compile in support for the GNU readline library.
  17.  
  18. CFLAGS= -s -O2 -DUSE_READLINE
  19. CC= gcc
  20. LIBS= -lreadline -ltermcap
  21. ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
  22. BINDIR= /usr/bin
  23. MANDIR= /usr/man/man1
  24. CATDIR= /usr/man/cat1
  25. INSTALL= install -c
  26. INSTALL_DATA= install -c -m 644
  27.  
  28. cdecl: c++decl
  29.     ln c++decl cdecl
  30.  
  31. c++decl: cdgram.c cdlex.c cdecl.c
  32.     $(CC) $(CFLAGS) -o c++decl cdecl.c $(LIBS)
  33.     rm -f cdecl
  34.  
  35. cdlex.c: cdlex.l
  36.     lex cdlex.l && mv lex.yy.c cdlex.c
  37.  
  38. cdgram.c: cdgram.y
  39.     yacc cdgram.y && mv y.tab.c cdgram.c
  40.  
  41. test:
  42.     ./cdecl < testset
  43.     ./c++decl < testset++
  44.  
  45. install: cdecl
  46.     $(INSTALL) cdecl $(BINDIR)
  47.     ln $(BINDIR)/cdecl $(BINDIR)/c++decl
  48.     $(INSTALL_DATA) cdecl.1 $(MANDIR)
  49.     $(INSTALL_DATA) c++decl.1 $(MANDIR)
  50.  
  51. clean:
  52.     rm -f cdgram.c cdlex.c cdecl y.output c++decl
  53.  
  54. clobber: clean
  55.     rm -f $(BINDIR)/cdecl $(BINDIR)/c++decl
  56.     rm -f $(MANDIR)/cdecl.1 $(MANDIR)/c++decl.1
  57.     rm -f $(CATDIR)/cdecl.1.gz
  58.  
  59. cdecl.cpio: $(ALLFILES)
  60.     ls $(ALLFILES) | cpio -ocv > cdecl.cpio
  61.  
  62. cdecl.shar: $(ALLFILES)
  63.     shar $(ALLFILES) > cdecl.shar
  64.